package org.dlnu.xeon.dao;

import org.apache.ibatis.annotations.Mapper;
import org.dlnu.xeon.domain.User;

import java.util.List;

@Mapper
public interface UserDao {
    /**
     * 新增用户
     * @param user
     * @return
     */
    void insertUser (User user);

    /**
     * 查询所有用户
     * @param
     * @return
     */
    List<User> selectAllUser();

    /**
     * 查询用户
     * @param uid
     * @return
     */
    User selectUser (Long uid);

    User selectUserByName (String name);

    User selectUserByIdNumber (String id_number);

    User selectUserByNumber (String number);

    User selectUserByUnit (String unit);
    /*
     *用户登录
     */
    User selectLoginUser(String number,String password);

    /**
     * 更新用户信息
     * @param user
     */
    void updateUser (User user);

    /**
     * 删除用户
     * @param uid
     */
    void deleteUser (Long uid);
}
